﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml;
using System.Text;
using System.Web;
using System.Web.UI;

namespace AutoUpdate
{
    public class GetConnect
    {
        public static string con = "";
        #region[conS]
        //public static string strPathXML = "version.xml";

        public static void Newload(string strPathXML,ref string strver,ref string strdate)
        {            
            // This call is required by the Windows Form Designer.
            string rt = "";
            XmlDocument xmlDocument = new XmlDocument();
                        
            try
            {
                //new
                
                int i = 0;
                XmlDocument doc = new XmlDocument();
                XmlTextReader read = new XmlTextReader(strPathXML);
                doc.Load(read);
                XmlNodeList goc = doc.SelectNodes(@"dmc");
                foreach (XmlNode node in goc)
                {
                    strver = node.SelectSingleNode("ver").InnerText.Trim().ToString();
                    strdate = node.SelectSingleNode("date").InnerText.Trim().ToString();
                    //rt += node.SelectSingleNode("ver").InnerText.Trim().ToString() +"///////";
                    //rt+= node.SelectSingleNode("date").InnerText.Trim().ToString();
                    i++;
                }
                read.Close();
            }
            catch (Exception ex)
            {                
            }            
        }
        #endregion
    }
}
